import request from '@/utils/request'

// 查询视频详情
export function getVideoDetail(id) {
  return request({
    url: '/video/getVideoDetail?videoId=' + id,
    method: 'get'
  })
}

// 新增视频
export function addVideo(video) {
  return request({
    url: '/video/addVideo',
    method: 'post',
    data: video
  })
}

// 
export function deleteVideo(id) {
  return request({
    url: '/video/deleteVideo?id=' + id,
    method: 'get'
  })
}

// 查询首页视频列表合集
export function homeListVideo(videoPartition) {
  return request({
    url: '/video/homeListVideo?videoPartition=' + videoPartition,
    method: 'get'
  })
}

// 分页查询视频
export function pageListVideo(video) {
  return request({
    url: '/video/pageListVideo',
    method: 'post',
    data: video
  })
}

// 播放视频
export function videoSlices(url) {
  return request({
    url: '/video/videoSlices?id=' + url,
    method: 'get'
  })
}


